fix(i18n): update zh-CN translations & add package.trends.toggle_stack_mode key#1688
fix(i18n): update zh-CN translations & add package.trends.toggle_stack_mode key#1688danielroe merged 2 commits intonpmx-dev:mainfrom
package.trends.toggle_stack_mode key#1688Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThis pull request introduces internationalization updates across multiple locale and schema files. The primary addition is a new translation key toggle\_stack\_mode for enabling stack mode functionality in the trends chart component. Beyond this, the Chinese (Simplified) locale receives substantial updates including new translation groups for size increase notifications, expanded compare section entries with file change details, and refinements to existing strings. Corresponding schema files are updated to reflect the new translation properties, and the changes are propagated across all supported locales including English variants. Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
app/components/Package/TrendsChart.vuei18n/locales/en.jsoni18n/locales/zh-CN.jsoni18n/schema.jsonlunaria/files/en-GB.jsonlunaria/files/en-US.jsonlunaria/files/zh-CN.json
| "size_increase": { | ||
| "title_size": "自 v{version} 以来体积显著增加", | ||
| "title_deps": "自 v{version} 以来依赖项数量显著增加", | ||
| "title_both": "自 v{version} 以来体积和依赖项显著增加", | ||
| "size": "安装大小增加了 {percent} (增大了 {size})", | ||
| "deps": "{count} 个依赖项" | ||
| }, |
There was a problem hiding this comment.
Preserve the “increase” meaning in size_increase.deps.
Line 165 currently reads as a plain dependency count, not an increase. Consider wording that keeps the delta semantics.
Suggested wording tweak
- "deps": "{count} 个依赖项"
+ "deps": "依赖项增加了 {count} 个"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "size_increase": { | |
| "title_size": "自 v{version} 以来体积显著增加", | |
| "title_deps": "自 v{version} 以来依赖项数量显著增加", | |
| "title_both": "自 v{version} 以来体积和依赖项显著增加", | |
| "size": "安装大小增加了 {percent} (增大了 {size})", | |
| "deps": "{count} 个依赖项" | |
| }, | |
| "size_increase": { | |
| "title_size": "自 v{version} 以来体积显著增加", | |
| "title_deps": "自 v{version} 以来依赖项数量显著增加", | |
| "title_both": "自 v{version} 以来体积和依赖项显著增加", | |
| "size": "安装大小增加了 {percent} (增大了 {size})", | |
| "deps": "依赖项增加了 {count} 个" | |
| }, |
There was a problem hiding this comment.
The dynamic value count will have a "+" sign; I don't think it needs to have "增加" added.
There was a problem hiding this comment.
@RYGRIT, thank you for the clarification! You're absolutely right—if the count value already includes the "+" sign (e.g., "+5"), then "{count} 个依赖项" naturally reads as "+5 个依赖项" and clearly conveys the increase without needing the additional "增加" word. That makes perfect sense and keeps the translation concise. The current wording is fine as is. 👍
🧠 Learnings used
Learnt from: serhalp
Repo: npmx-dev/npmx.dev PR: 1183
File: lunaria/files/uk-UA.json:305-318
Timestamp: 2026-02-08T18:44:10.538Z
Learning: In the npmx.dev project, new or changed entries in i18n translation files (locale JSON files) may be omitted from non-English languages. Translations are not completed in-band in the same PR and are tracked elsewhere. It is acceptable for non-English locale files to be missing keys that exist in English locale files.
Learnt from: userquin
Repo: npmx-dev/npmx.dev PR: 1096
File: i18n/locales/es-419.json:34-41
Timestamp: 2026-02-06T14:53:23.339Z
Learning: In the npmx.dev project, when using country locale variants (e.g., es-419, es-ES), place only translations that differ from the base language in variant JSON files (e.g., es-419.json). The base file (es.json) is loaded first, then the variant file overlays any keys it defines. This behavior is provided by vue-i18n's multiple-files feature. See CONTRIBUTING.md under 'Country variants (advanced)' for details.
📚 Description
new i18n key
package.trends.toggle_stack_mode("Toggle stack mode") toen.json,schema.json, and wire it up inTrendsChart.vuezh-CN translation fixes
filters.security_options.secure/insecure: values were swapped ("带有警告" ↔ "不带警告"), now correctedfilters.table.security_warning/no_packages: values were swapped, now correctedorg.teams.remove_user: "从团队 {user} 中移除" → "将 {user} 从团队中移除" (grammar fix)package.trends.date_range/date_range_multiline: "到" → "至" (more formal)a11y.contact.p1: improved wording for accessibility feedback section